<?php

declare(strict_types=1);

namespace App\Model;


/**
 * @property int $id
 * @property int $user_id
 * @property string $type
 * @property string $content
 * @property string $email
 * @property string $reply_content
 * @property int $status
 * @property string $create_time
 * @property string $update_time
 */
class Feedback extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'feedback';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['user_id', 'type', 'content', 'email', 'reply_content', 'status'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'user_id' => 'integer', 'status' => 'integer'];

    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');

    }
}
